ast,checker: add type checking for param of fn passed as generic arg#26257
Merged
spytheman merged 10 commits intovlang:masterfrom Feb 4, 2026
Merged
ast,checker: add type checking for param of fn passed as generic arg#26257spytheman merged 10 commits intovlang:masterfrom
spytheman merged 10 commits intovlang:masterfrom
Conversation
Member
Author
|
Adventofcode has a cgen issue, will look into it. |
Member
|
This PR managed to find implicit type conversion bugs in stats.v , which is a very good sign. |
Member
|
the fn (shared eb EventBus[T]) publish(event_type EventType, data T) {
lock eb {
for _, subscriber in eb.subscribers[event_type] {
- subscriber(data)
+ subscriber[T](data)
}
}
}but imho should not have to, the type should have been inferred |
Member
Author
|
Good that it is finding issues. Been kind of going in circles fixing a test and a different one breaks for a while :/ |
Member
Author
|
Just rebased to master for now. |
Member
Author
|
I believe this is also a type promotion bug: |
This reverts commit 5baded3.
Member
Author
|
Aaaaah going in circles. |
Member
Author
|
Looks like it's working now. |
spytheman
reviewed
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #26195.